package com.loit.business.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

@Data
@AllArgsConstructor
@NoArgsConstructor
@ApiModel(value = "User", description = "用户信息对象")
@TableName(value = "test_user_import")    //表名称和实体类的对应关系
public class User {

    @ApiModelProperty(value = "主键id")
    @TableId
    private int id;

    @ApiModelProperty(value = "用户名")
    private String userName;

    @ApiModelProperty(value = "密码")
    public Integer age;

    @ApiModelProperty(value = "地址")
    private String address;

    //字段添加填充内容
//    @TableField(fill = FieldFill.INSERT ,value = "create_time")
//    private LocalDateTime createTime;
//    @TableField(fill = FieldFill.INSERT_UPDATE ,value = "update_time")
//    private LocalDateTime updateTime;

    @ApiModelProperty(value = "不被表识别字段")
    @TableField(exist = false)     //这样写，这个字段就不会被mybatis-plus当做表对应的字段所使用
    private String remark;



}
